import Constants from '../constants/role.constants'

const defaultState = {
    roleList: [
    ]
}

export default (state = defaultState, action) => {  //就是一个方法函数
    switch (action.type) {
        case Constants.INIT_ROLE:
            console.log(action)
            return {
                roleList: [...action.value]
            }
        default:
            return state
    }
}
